import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/views/Index'

Vue.use(Router)

export default new Router({
	mode: 'hash',
	base: process.env.BASE_URL,
	linkActiveClass: 'active',
	linkExactActiveClass: 'active',
	routes: [{
		path: '/',
		component: Index,
		redirect: 'Home', // 一进入页面直接重定向到 Home 的路由下
		children: [{
				path: '/Home',
				name: 'Home',
				component: () =>
					import('@/views/Home.vue'),
				meta: {
					title: 'Home'
				}
			},
			{
				path: '/Axios',
				name: 'Axios',
				component: () =>
					import('@/views/Axios.vue'),
				meta: {
					title: 'Axios'
				}
			},
			{
				path: '/Props',
				name: 'Props',
				component: () =>
					import('@/views/Props.vue'),
				meta: {
					title: 'Props'
				}
			}
		]
	}]
})